// pages/user/userCenter/comps/userFunc/userFunc.js
Component({
    /**
     * 组件的属性列表
     */
    properties: {
        isShow: Boolean,
        userInfo: Object
    },

    /**
     * 组件的初始数据
     */
    data: {

    },

    /**
     * 组件的方法列表
     */
    methods: {
        myCard: function() {
            wx.navigateTo({
                url: '/pages/user/userCard/userCard'
            })
        },
        goAddressList: function() {
            wx.navigateTo({
                url: '/pages/user/address/addressList/addressList?type=readOnly'
            })
        },
        goMyConcat: function() {
            wx.navigateTo({
                url: '/pages/user/concat/concat'
            })
        },
        goAbout: function() {
            wx.navigateTo({
                url: '/pages/about/about'
            })
        },
        goEmpowerTimes: function() {
            wx.navigateTo({
                url: '/pages/user/empower/empowerTimes/empowerTimes'
            })
        },
        goEmpowerList: function() {
            wx.navigateTo({
                url: '/pages/user/empower/empowerList/empowerList'
            })
        },
        goUpgradeApply: function() {
            wx.navigateTo({
                url: '/pages/user/empower/upgradeApply/upgradeApply'
            })
        },
        invite: function() {
            this.triggerEvent('invite')
        },
        goMyArtical: function() {
            wx.navigateTo({
                url: '/pages/socialSystem/myArtical/myArtical'
            })
        },
        myCompany: function() {
            wx.navigateTo({
                url: '/pages/user/company/company'
            })
        },
        goMyVoiceCourse: function() {
            wx.navigateTo({
                url: '/pages/course/voiceCourse/my/my'
            })
        },
        goMyOfflineCourse: function() {
            wx.navigateTo({
                url: '/pages/course/offlineCourse/applyList/applyList?navType=0'
            })
        },
        goMyShop: function() {
            if (this.data.userInfo.store_type < 1) {
                wx.showModal({
                    title: '提示',
                    content: '暂无权限，请前往成为形象代言人',
                    showCancel: false,
                    success(res) {
                        if (res.confirm) {
                            wx.navigateTo({
                                url: '/pages/beVip/beVip'
                            })
                        }
                    }
                })
                return
            }
            wx.navigateToMiniProgram({
                appId: 'wxf9ef3496f0b3195a',
                path: '/pages/index/index',
                success(res) {
                    // 打开成功
                    console.log(res)
                }
            })
        },
        goShopEdit: function() {
            wx.navigateTo({
                url: '/pages/shopInfo/shopInfo'
            })
        },
        goMyOpus: function() {
            wx.navigateTo({
                url: '/pages/opus/opusList/opusList'
            })
        },
        goCompany: function() {
            wx.navigateTo({
                url: '/pages/company/company'
            })
        },
        userBrowse: function() {
            wx.navigateTo({
                url: '/pages/user/user_browse/user_browse'
            })
        },
        goMyCrowd: function() {
            wx.navigateTo({
                url: '/pages/crowdFunding/apply/apply?type=edit'
            })
        },
        goMyCommunity: function() {
            wx.navigateTo({
                url: '/pages/socialSystem/myArtical/myArtical'
            })
        }
    }
})